<%@ page language="java"
	import="java.util.*,com.partner.prepay.role.form.Role"
	pageEncoding="utf-8"%>
<%@ include file="/easyprepay/jsp/common/head.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>设置用户角色</title>
	</head>

	<body>
		设置用户角色
		<br>

		<%
			Map<String, Object> userMap = (Map<String, Object>) request.getAttribute("userMap");
			List<Role> roleList = (List<Role>) request.getAttribute("roleList");
			String roleName = userMap.get("ROLE_NAME") + "";
			roleName = "null".equals(roleName) ? "无角色" : roleName;
			String id = userMap.get("ID") + "";
		%>
		<table align="center" width="100%" border="1">
			<tr><td>用户id：</td><td><%=id%></td></tr>
			<tr><td>用户名：</td><td><%=userMap.get("USER_NAME")%></td></tr>
			<tr><td>登录账号:</td><td><%=userMap.get("LOGIN_ID")%></td></tr>
			<tr><td>当前角色:</td><td><%=roleName%></td></tr>
		</table>
		<form action="<%=basePath%>userRole.do" method="post">
			<input type="hidden" name="method" id="method" value="subUserRole" />
			<input type="hidden" id="currentUser" name="currentUser"
				value="<%=user.getUsername()%>" />
			<input type="hidden" name="userId" id="userId" value="<%=id%>" />
			<input type="hidden" name="userKey" id="userKey"
				value="<%=user.getKeyWord()%>" />
			选择角色：
			<select name="roleId" id="roleId">

				<%
						for (Role userRoles : roleList) {
					%>
				<option value="<%=userRoles.getId()%>">
					<%=userRoles.getRoleName()%>
				</option>
				<%
						}
					%>

			</select>
			<input type="submit" />
		</form>

	</body>
</html>
